package state;

public class FarmMachineContext {
    private EquipmentState state;

    public FarmMachineContext() {
        this.state = new IdleState();
    }

    public void setState(EquipmentState state) {
        this.state = state;
    }

    public EquipmentState getState() {
        return state;
    }


        public void request() {
            try {
                state.handleState(this);
            } catch (Exception e) {
                System.out.println("状态转换出错: " + e.getMessage());
            }
        }
    }

